<?php session_start();
if($_SESSION["previouspage"] == null)
{//if a user comes into this page directly, redirect him back to the index
	$_SESSION["previouspage"] = "../index.php";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/template.css" />
<link rel="stylesheet" type="text/css" href="css/home.css" />
<link rel="stylesheet" type="text/css" href="css/login.css" />
<title>CoRAL- Login</title>
</head>
<body>
<div id="body-wrapper">
<?php include_once 'static/header.php'; ?>
<div id="body">
	<div id="content">
		<form name="login" action="controller/login.php" method="post">
			<h1 align="center">Login</h1>
			<p align="center"><?php echo $_SESSION["errmsg"];?></p>
			<table align="center">
			<tr>
				<td class="labelright"><label for="accountNo"><strong>Username: </strong></label></td>
				<td><input id="account" type="text" name="accountNo" maxlength="20" size="20" value="" /></td>
			</tr>
			<tr>
				<td class="labelright"><label for="password"><strong>Password: </strong></label></td>
				<td><input name="password" id="psword" type="password" maxlength="18" size="20" value=""/></td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" name="button" value="Login" align="left"/></td>
			</tr>
			
			<tr>
				<td></td>
				<td><a href="forgetpassword.php">Forget Password?</a></td>
			</tr>
			
		</table>
		</form>
		
	</div>
</div>
<?php $_SESSION["errmsg"] = null; ?>
<?php include_once 'static/footer.html'; ?>
</div>
</body>
</html>